package com.social.service;

import com.item.dao.model.User;
import com.social.dao.FriendMapper;
import com.social.dao.model.Friend;
import com.social.dao.model.FriendExample;
import com.social.dao.model.FriendKey;
import com.social.daoEx.FriendMapperEx;

import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FriendService {
    @Autowired
    private FriendMapper friendMapper;
    @Autowired
    private FriendMapperEx friendMapperEx;

    private static final Logger logger = Logger.getLogger(FriendService.class);

    public int countByExample(FriendExample example) {
        return this.friendMapper.countByExample(example);
    }

    public Friend selectByPrimaryKey(FriendKey key) {
        return this.friendMapper.selectByPrimaryKey(key);
    }

    public List<Friend> selectByExample(FriendExample example) {
        return this.friendMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(FriendKey key) {
        return this.friendMapper.deleteByPrimaryKey(key);
    }

    public int updateByPrimaryKeySelective(Friend record) {
        return this.friendMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(Friend record) {
        return this.friendMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(FriendExample example) {
        return this.friendMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(Friend record, FriendExample example) {
        return this.friendMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(Friend record, FriendExample example) {
        return this.friendMapper.updateByExample(record, example);
    }

    public int insert(Friend record) {
        return this.friendMapper.insert(record);
    }

    public int insertSelective(Friend record) {
        return this.friendMapper.insertSelective(record);
    }

	public List<User> selectMyFriends(Map<String,Object> map) {
		return friendMapperEx.selectMyFriends(map);
	}

	public List<User> selectMyFocus(Map<String,Object> map) {
		return friendMapperEx.selectMyFocus(map);
	}
}